<?
	/* Behind */
	$tournaments = explode("-", $tournament_id);
	FunctionsHelper::saveCurrentPageInSession($PageName);
	FunctionsHelper::saveInSession('tournament_id', $tournament_id);

	FunctionsHelper::includeFiles(
		array(
			PUBLIC_CONTROLLERS_DIRECTORY . 'tournaments.php',
			PUBLIC_CONTROLLERS_DIRECTORY . 'tournament_classes.php'
		)
	);

	$arrTournament = array();
	$Tournaments = new tournaments();
	foreach ($tournaments as $id){
		if ($id > 0){
			$Tournament = $Tournaments->getOne($id);

			$nations = $Tournament->getClass()->getDescription() == "Nations" ? 1 : 0;
			
			$Tournament->setFixture($Tournaments->getAllMatches($Tournament->getId(), $nations));
			$arrTournament[] = $Tournament;
		}
	}
	

	
	$Name = "";
	if (isset($arrTournament[0]))
		$Name = $arrTournament[0]->getName();

	$BothSex = 0;
	if (isset($arrTournament[1]))
		$BothSex = 1;
?>